<template>
  <el-upload
    v-model:file-list="model[modelName]"
    :class="className"
    :action="action"
    :multiple="multiple"
    :limit="limit"
    :method="method"
    :data="data"
    :name="name"
    :drag="drag"
    :list-type="listType"
    :disabled="disabled"
    :on-preview="handlePreview || function () {}"
    :on-remove="handleRemove || function () {}"
    :before-remove="beforeRemove || function () {}"
    :on-exceed="handleExceed || function () {}"
  >
    <div v-if="uploadSlot" v-html="uploadSlot()"></div>
    <template #tip v-if="tipSlot">
      <div class="el-upload__tip">
        <div v-html="tipSlot()"></div>
      </div>
    </template>
    <template #file v-if="fileSlot">
      <div class="el-upload__file">
        <div v-html="fileSlot()"></div>
      </div>
    </template>
  </el-upload>
</template>

<script>
import props from "./props";
export default {
  mixins: [props],
};
</script>

<style lang="scss" scoped></style>
